/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.registration.core;

import com.registration.Persistent;

/**
 * @date   May 7, 2012
 * @author Ggutierrez
 */
public class Category implements Persistent{
    private Long id;
    private String description;
    private Float cost;
    private boolean requiresValidation = false;
    private boolean restricted = false;
    private String color;
    private String verificationCodes;

    public Category() {
    }
    
    public Category(String description, Float cost) {
        this.description = description;
        this.cost = cost;
    }
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Float getCost() {
        return cost;
    }

    public void setCost(Float cost) {
        this.cost = cost;
    }
    
    @Override
    public int hashCode() {
        return id.hashCode();
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if (!(other instanceof Category)) {
            return false;
        }
        Category _i = (Category) other;
        return id != null ? id.equals(_i.id) : false;
    }

    public boolean isRequiresValidation() {
        return requiresValidation;
    }

    public void setRequiresValidation(boolean requiresValidation) {
        this.requiresValidation = requiresValidation;
    }

    public boolean isRestricted() {
        return restricted;
    }

    public void setRestricted(boolean restricted) {
        this.restricted = restricted;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getVerificationCodes() {
        return verificationCodes;
    }

    public void setVerificationCodes(String verificationCodes) {
        this.verificationCodes = verificationCodes;
    }
}
